<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>提示消息测试</title>
    <style>
        .tooltip{
            position: relative;
            display: inline-block;
            border: 1px dotted black;
        }
        .tooltip .tooltiptext{
            visibility: hidden;
            width: auto;
            background-color: black;
            color: #f1f1f1;
            text-align: center;
            border-radius: 6px;
            padding: 5px 15px 5px 15px;
            margin-top: 10px;

            position: absolute;
            z-index: auto;
        }
        .tooltip .tooltiptext::after{
            content: "";
            position: absolute;
            bottom: 100%;
            left: 50%;
            margin-left: -5px;
            border-with:5px;
            border-style: solid;
            border-color: transparent transparent black transparent;
        }
        .tooltip:hover .tooltiptext{
            visibility: visible;
        }
    </style>
</head>
<body>
    <div class="tooltip">消息提醒测试
        <span class="tooltiptext">提示文本</span>
    </div>
</body>
</html>